#import "SilhouetteKineticController.h"
        
#import "SilhouetteKineticModel.h"
#import "SilhouetteKineticCell.h"
#import "Masonry.h"

@interface SilhouetteKineticController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *igniteTableView;
@property (nonatomic, strong) NSMutableArray *naturalDelightDatas;

@end

@implementation SilhouetteKineticController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self zebraPrismIlluminateConfiglayout];
	[self inspireOnyxHeatwavegetData];
}


- (UITableView *)figHandleTableView {
    if (!_igniteTableView) {
        _igniteTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _igniteTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _igniteTableView.estimatedRowHeight = 0;
        _igniteTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _igniteTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _igniteTableView.delegate = self;
        _igniteTableView.dataSource = self;
        _igniteTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _igniteTableView.showsVerticalScrollIndicator = NO;
        _igniteTableView.showsHorizontalScrollIndicator = NO;
        _igniteTableView.backgroundColor = UIColor.clearColor;
    }
    return _igniteTableView;
}

//: 懒加载数据模型数组
- (NSMutableArray *)naturalDelightDatas {
	if (!_naturalDelightDatas) {
		_naturalDelightDatas = [NSMutableArray array];
	}
	return _naturalDelightDatas;
}

//: 初始化页面UI
- (void)zebraPrismIlluminateConfiglayout {

	[self.view addSubview:self.igniteTableView];
	[self.igniteTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


//: 获取数据模型
- (void)inspireOnyxHeatwavegetData {
	
}

#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.naturalDelightDatas.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    SilhouetteKineticCell *merge = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([SilhouetteKineticCell class])];
    if (merge == nil) {
        merge = [[SilhouetteKineticCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([SilhouetteKineticCell class])];
    }
    merge.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return merge;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
